﻿//-----------------------------------------------------------------
//
// @(#)$Id: Summary.aspx.cs,v 1.0 2013/12/30 13:22:54 lichunhua Exp $
// @(#)$Author: lichunhua  $
// @(#)$Date: 2013/12/30 13:22:54 $
// @(#)$Description:
//
//
//
//                 All Rights Reserved.
//-----------------------------------------------------------------
using System;
using System.Data;
using System.Text;
using ebay.Dal;
using ebay.Utility;

public partial class UI_Mail_Summary : System.Web.UI.Page
{
  protected void Page_Load(object sender, EventArgs e)
  {
    String id = Request["orderid"];
    String eBayUserID = Request["ebayuserid"];
    Orders orders = new Orders();

    DataTable table = orders.GetOrderSummary(eBayUserID, id);
    if (table != null && table.Rows.Count != 0) {
      orderID.InnerText = Convert.ToString(table.Rows[0]["OrderID"]);
      buyerID.InnerText = Convert.ToString(table.Rows[0]["UserID"]);
      status.InnerText = Convert.ToString(table.Rows[0]["StatusName"]);
      resend.InnerText  = Convert.ToString(table.Rows[0]["Refund"]);
      deliverytype.InnerText = Convert.ToString(table.Rows[0]["PostageService"]);
      postage.InnerText = table.Rows[0]["PostageAndPackaging"] == DBNull.Value ? "" : Convert.ToDouble(table.Rows[0]["PostageAndPackaging"]).ToString("0.00");
      saledate.InnerText = Convert.ToString(table.Rows[0]["SaleDate"]);
      totalprice.InnerText = table.Rows[0]["TotalPrice"] == DBNull.Value ? "" : Convert.ToDouble(table.Rows[0]["TotalPrice"]).ToString("0.00");
      paymenttype.InnerText = Convert.ToString(table.Rows[0]["PaymentMethod"]);
    }
  }
}
